def ApplyModel(fp):
    import GlobalParam as GP
    gp=GP.iparam
    # Sweep all flows
    for i in range(gp.get_nflow()):
        for j in range(gp.flow[i].get_nstage()):
            t=gp.afs1(i,j)
            for k in range(t.get_npath()):
                pinfo=t.path_info[k]
                for item in t.path_model[k]:
                    t.add_path_info(k,gp.pmodel1(item))
